export default function(sequelize, DataTypes) {
  return sequelize.define('user', {
    user_id: {
      type: DataTypes.STRING(20),
      allowNull: false,
      comment: "用户id"
    },
    email: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "用户邮箱"
    },
    nexttime: {
      type: DataTypes.CHAR(13),
      allowNull: true,
      comment: "下次发送的最小时间"
    },
    gupiao_id: {
      type: DataTypes.STRING(10),
      allowNull: false,
      comment: "每个股票一天只发送一次"
    },
    id: {
      autoIncrement: true,
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true,
      comment: "主键id"
    }
  }, {
    sequelize,
    tableName: 'user',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
